'insert "It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of"'
call setbusy(87)
'insert " incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us,"'
call setbusy(94)
'insert " we had nothing before us, we were all going direct to Heaven, we were all going direct the other way."'
call setbusy(100)
'closebusyrequester 'hBusyReq
RETURN
PRINTFONTS:
/* PRINT LOOP */
openbusyrequester message "'Creating Font Specimens...'" thermometer enabled abort enabled total fontcount current 0
hBusyReq=result
/* Build one master stem variable from the fonts */
do i=1 to pfontcount
/* Get the type styles for the font */
getfontstyles pfonts.i styles
stylecount=result
/* Repeat for each type style */
do ii=0 to stylecount-1
/* Fill the master stem variable */
totalfonts=totalfonts+1
mfonts.totalfonts=pfonts.i
mstyles.totalfonts=styles.ii
end ii
end i
/* Count the pages to print */
if specsize=small then do
pagecount=trunc(totalfonts/6)
lastpage=(totalfonts/6-pagecount)*6 /* how many fonts on the last page? */
if lastpage>0 then pagecount=pagecount+1 /* add a page if there's a remainder */
end
else pagecount=totalfonts
/* Repeat for each page to print */
j=0
do i=1 to pagecount
j=j+1
if specsize=small then do /* Layout for 6 to a page */
do ii=1 to 6
k=ii+(ii-1)*0.5 /* this gives us the correct offset */
/* Change the title(s) */
'selecttext at 0.625i 'k+0.0625'i'
'selecttext all'
if lastpage>0 & i=pagecount & ii>lastpage then do
'deletetext'
'selectobject at 0.65i 'k+0.4'i'
'deleteobject'
end
else do
'insert "'mfonts.j'-'mstyles.j'"'
/* Change the font and style */
'refresh wait'
'clearstyletag FontSample'.ii
'setfont 'mfonts.j' styletag FontSample'ii
'settypestyle 'mstyles.j' styletag FontSample'ii
'refresh continue'
end
j=j+1
end ii
j=j-1
end
else do
/* Change the title(s) */
'selecttext at 0.75i 1.25i'
'selecttext all'
'insert "'mfonts.j'-'mstyles.j'"'
/* Change the font and style */
'refresh wait'
'clearstyletag FontSample'
'setfont 'pfonts.i' styletag FontSample'
'settypestyle 'styles.ii' styletag FontSample'
'refresh continue'
end
/* Print the font sample page */
call setbusy((i-.7)/pagecount*100)
'printdocument copies 1 page 1 sides both scale actual output grayscale printermarks off mirror off negative off'
call setbusy(i/pagecount*100)
end i
'closebusyrequester 'hBusyReq
'closedocument force'
RETURN
DOALERT:
parse arg astring
/* Display an alert requester */
allocarexxrequester '"Macro Alert"' 334 55
hAlertReq=result
addarexxgadget hAlertReq TEXT 8 12 268 border none string '"'astring'"'